Skip to main content

All Questions

Tagged with
0votes
1answer
53views

Is there a tool to "recursively" move/rename a directory (with conflicts/merging)?

Imagine I want to move (rename) a directory tree /var/lib/postgres/data to /var/lib/postgres/data.old: /var/lib/postgres └── data ├── base │   ├── 16390 │   │   └── <...> │   └── ...
intelfx's user avatar
  • 5,659
0votes
0answers
50views

How can I combine multiple files into a single larger file on a non-virtual filesystem?

Is there any filesystem where I can say map file1, file2, file3 and file4 together to file1234? file1 is 100M file2 is 100M file3 is 100M file4 is 100M ... and file1234 will then be 400M, and it is ...
user447274's user avatar
0votes
2answers
83views

Preserving file extensions when renaming duplicate files with rsync

I have multiple directories whose contents overlap. Sometimes the files are exactly the same, sometimes the names are the same and the contents differ and sometimes files with the same name have ...
user11718766's user avatar
0votes
3answers
77views

Keeping owners in a folder copy

I'm trying to copy a folder (SRC) containing some files and subfolders. The content and SRC itself have setgid bit enabled (that is the s in place of the x in the group triplet). Furthermore, the ...
user9952796's user avatar
3votes
1answer
156views

Hard link as destination of cp and rsync

Where do I find documentation of behavior of cp and rsync commands when the destination path shares the inode with another path? In other words, when I do $ cp [options] src dest $ rsync [options] src ...
norio's user avatar
1vote
2answers
747views

How to break syslog into smaller files without losing data

Here we try to break syslog file into smaller chunks. For that we use following script. #!/bin/bash date=$(date +%Y%m%d_%H%M) cp /path/to/sys.log /path/to/chuck/file.log cat /dev/null > /path/to/...
Sachith Muhandiram's user avatar
0votes
0answers
883views

Copying all files and folders of a directory using tar

I am trying to copy my files from ssd to external hdd using linux live boot. The command I'm writing is: root@ubuntu:/media/ubuntu/4bd92f4b-6b48-4f4a-83ad-9d82d3be488b/home/pegasus# tar cf - Downloads ...
Zeshan Ahmed Nobin's user avatar
0votes
1answer
127views

How to Tranfser huge amount of Files to slow USB Drive (dd, cp, rsync, 7z, tar)

I have like 5GB of data and a very slow USB-Drive. Should I use dd, cp or rsync? Should I compress them first into for example 7z / tar or not? In short: What is the best way and the best practices ...
Bog's user avatar
  • 1,124
1vote
1answer
261views

Instantly copy files from one location to the other

I have a situation where there are few autosys jobs monitoring the files and then based on the file availability its triggering the dependent jobs. What I am looking for: As soon as a file arrives ...
Sachin khot's user avatar
0votes
1answer
38views

Program/method to repair a partially unreadable file from a backup copy

I have a partially damaged file on an integrity-verifying filesystem (btrfs): $ pv -c \{30939216-15e2-4563-b77e-2ab8687ec333\}.vdi >/dev/null pv: {30939216-15e2-4563-b77e-2ab8687ec333}.vdi: read ...
intelfx's user avatar
  • 5,659
0votes
1answer
232views

How can I optimize the transfer of files between two systems and also trim the file

I have computer 1 logging voltage data to a file volts.json every second. My second computer connects via ssh and grabs that file every 5 minutes. Splunk indexes that file for a dashboard. Is scp ...
Tom's user avatar
  • 129
1vote
2answers
667views

Can I copy a snapshot of a file that's being constantly modified?

I have a file that's being constantly held open and continuously modified by another process. This process is continuously seeking to different parts of the file and writing new blocks. I'd like to be ...
billpg's user avatar
0votes
2answers
2kviews

One-way synchronize folders [duplicate]

Using Bash, I need to copy and override some files that have equal names but different contents from source, while ignoring equal files. I saw no option in cp's manual for copying only differing files....
markfree's user avatar
1vote
0answers
843views

Filesystem infinite loop

So I accidentially created an infinite loop by copying a parent folder into the current one and now it loops infinitely. Is it safe to delete the folder? Or how do I delete the looping directory ...
Sebastian L's user avatar
0votes
1answer
1kviews

How to limit the number of files in a directory?

Is it even possible to limit the number (and not the size) of files in a specific directory? My directory only can contain up to five files, and cp file_6 mydir must not be allowed.
mahyar's user avatar

153050per page
close